package eigenfiles;
import java.net.InetAddress;
import java.net.UnknownHostException;


public class Scorebord {
private static boolean testMode = false;
private static String computerName;
private static String settingsPath;
	
	public static boolean isTestMode() {
		return testMode;
	}
	
	private static void setTestMode(boolean test) {
		testMode = test;
	}
	public static String getComputerName() {
		return computerName;
	}
	private static void setComputerName(){
		try {
			InetAddress localHost = InetAddress.getLocalHost();
			Scorebord.computerName = localHost.getCanonicalHostName();
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public static String getSettingsPath() {
		return Scorebord.settingsPath;
	}
	private static void setSettingsPath(){
		String computerNm = Scorebord.getComputerName();
		if (computerNm.equalsIgnoreCase("Jochem-PC")) {
			System.out.println("Delft");
			Scorebord.settingsPath = "C:/Users/Jochem/workspace/Scorebord/instellingen.txt";
		} else {

		}
	}
	
	public static void main(String[] args) {
		Scorebord.setComputerName();
		for (int i = 0; i < args.length; i++) {
			if (args[i].contains("-test")) {
				Scorebord.setTestMode(true);
			}
		}
		System.out.println(Scorebord.isTestMode());
		
		
		System.out.println(Scorebord.getComputerName());
		Scorebord.setSettingsPath();

	}

}
